<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>用户评价</title>
<script type='text/javascript' src='js/jquery-1.4.2.min.js'></script>
		<script type='text/javascript' src='js/jquery.validate.min.js'></script>
		<script type='text/javascript' src='js/common.js'></script>
<link href="manage/manage.css" rel="stylesheet" type="text/css">
<link href="images/css.css"  rel="stylesheet" type="text/css" />
<script type="text/javascript"> 
    
    function deleteComment(comId)
	{
	 if(!confirm("您确定要删除该用户评价吗?"))
	 {
	  return;
	 }
	 document.location.href="comment!delUserComent.action?delId="+comId;
	} 
	 //转至多少页码
	 function changePage(listId)
	 {
	  document.location.href="comment!listUserComent.action?pageNo="+listId;
	 } 
	 
	 //详细
	 function sendUpdateComment(comId)
	 {
	     document.location.href="comment!detailUserComent.action?detailId="+comId;
	 }
	</script>
</head>
<body style="margin:0px; text-align:center;font-size:12px;" bgcolor="#F1F1F1" >
<div id="top">
 	<!-- 头部-->
 	<%@include file="mainTop.jsp"%>
</div>
<div id="top2"></div>

<!-- 中间-->
<div id="main1">
<!-- 左边-->
 <%@include file="mainLeft.jsp"%>
 <div class="mainr2">
<table width="789" height="539" border="0" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1">
  <tr>
    <td height="500" align="center" valign="top" bgcolor="#FFFFFF" style="border:1px solid #C5C5C5; padding:1px ;"><table width="100%" height="32" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="1%" height="32" background="images/sp_bg.jpg">&nbsp;</td>
        <td width="3%" align="center" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><img src="images/dian.jpg" width="10" height="16" /></td>
        <td width="95%" align="left" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><span class="STYLE3">用户评价</span> &nbsp;&nbsp;&nbsp;&nbsp;<a href="<%=basePath%>/manage/addUserComment.jsp">新增用户评价</a></td>
        <td width="1%" background="images/sp_bg.jpg"></td>
      </tr>
    </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="8">&nbsp;</td>
        </tr>
      </table>
      <s:if test="pageObj.data.size()>0">
      <s:iterator value="pageObj.data" var="userCom" status="st">
      <table width="767" height="97" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="94" height="97" align="center" style="border:1px solid #DBDBD">
          <s:if test="#userCom.ico==''"> <img src="images/rwlz.jpg" width="66" height="78"></s:if>
          <s:else>  <img src="<%=basePath%>/upload/usercoment_pic/${userCom.ico}" width="66" height="78"></s:else>
          </td>
          <td width="661" align="center"><table width="648" height="97" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="637" height="26"><strong>${userCom.title}</strong></td>
            </tr>
            <tr>
              <td height="23">姓名：${userCom.userName}&nbsp;&nbsp;&nbsp;所属公司：${userCom.company}&nbsp;&nbsp;&nbsp;发布时间：<s:date name="#userCom.commentTime" format="yyyy-MM-dd  HH:mm:ss"/></td>
            </tr>
            <tr>
              <td height="48" style="line-height:20px;">  <div style="width:600px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">${userCom.content}</div><a href="javaScript:sendUpdateComment('${userCom.id}');">编辑 </a>&nbsp;&nbsp;<a href="javaScript:deleteComment('${userCom.id}');">删除 </a></span>.</td>
            </tr>
          </table></td>
        </tr>
      </table>
      </s:iterator>
      </s:if>
        <s:else><p style="color: red;font-size: 12px;text-align: center;">您还没有增加相关信息!</p></s:else>
     <s:if test="pageObj.totalRecord>5">
      <table width="770" height="39" border="0" cellpadding="0" cellspacing="0" style="border-top:1px solid;">
        <tr>
          <td width="770" align="right"><a href="comment!listUserComent.action?pageNo=1">首页</a>&nbsp;
		   <s:if test="pageObj.hasPrePage==false" >上一页</s:if>
            <s:else> <a href="comment!listUserComent.action?pageNo=<s:property value="pageObj.pageNo-1"/>">上一页</a></s:else>
   
		  &nbsp;<s:if test="pageObj.hasNextPage==false">下一页</s:if>
              <s:else> <a href="comment!listUserComent.action?pageNo=<s:property value="pageObj.pageNo+1"/>" >下一页</a></s:else>
			  
		  &nbsp;<s:if test="pageObj.pageNo==pageObj.totalPage">末页</s:if>
		  <s:else><a href="comment!listUserComent.action?pageNo=<s:property value="pageObj.totalPage"/>" >末页</a></s:else>
		  
		  &nbsp;&nbsp;第${pageObj.pageNo}页&nbsp;|&nbsp;共${pageObj.totalPage}页&nbsp;|&nbsp;共${pageObj.totalRecord}条&nbsp;&nbsp;转至&nbsp;
            <s:select list="pageObj.listNum" onchange="changePage(this.value)" id="pageNo" name="pageNo">
            </s:select>
          &nbsp;</td>
        </tr>
      </table>
	 </s:if>  
	
     </td>
  </tr>
</table>
 </div>

</div>


</body>
</html>
